package com.risetechnology.krystalkitchen1;

import java.util.List;

import android.os.Bundle;
import android.view.Window;
import android.widget.ListView;

import com.risetechnology.adapter.RecipeUpdateDetailAdapter;
import com.risetechnology.common.Shared;
import com.risetechnology.data.Recipe;
import com.risetechnology.master.NavigationActivity;

public class ActivityRecipeUpdateDescription extends NavigationActivity {
	private ListView listviewRecipes;
	public static List<Recipe> recipesList;
	private static RecipeUpdateDetailAdapter recipeListAdapter;
	private String packageId;

	@Override
	protected void onCreate(Bundle savedInstanceState) {
		super.onCreate(savedInstanceState);
		requestWindowFeature(Window.FEATURE_NO_TITLE);
		setContentView(R.layout.activity_recipe_update_description);

		packageId = getIntent().getStringExtra("package_id");

		listviewRecipes = (ListView) findViewById(R.id.lv_recipes);
		if (packageId != null) {
			recipesList = Shared.dbAdapter.getRecipeByPackageId(packageId);
			recipeListAdapter = new RecipeUpdateDetailAdapter(
					ActivityRecipeUpdateDescription.this,
					R.layout.list_item_recipe_update_detail, recipesList);
			listviewRecipes.setAdapter(recipeListAdapter);
		}
	}

}
